def anagrams?(a, b)
	a.downcase.split(//).sort === b.downcase.split(//).sort
end
def combine_anagrams(words)
	b = []
	words.each do |x| 
		found = false
		if b.length === 0 
				b.push([x])
		else 
		 
				b.each do |y|
					if anagrams?(x, y[0])
						found = true
						y.push(x)
						break
					end
				end
				if !found
					b.push([x])
				end

		end
	end
	b
end